﻿using SqlSugar;

namespace Zhp.Workflow.Entity
{
    [SugarTable("Elsa.WorkflowDefinitions")]
    public class Elsa_WorkflowDefinition
    {
        [SugarColumn(IsPrimaryKey = true, Length = 450, ColumnDescription = "ID主键")]
        public string Id { get; set; }

        [SugarColumn(IsNullable = false, Length = 450, ColumnDescription = "流程ID")]
        public string DefinitionId { get; set; }

        [SugarColumn(IsNullable = true, Length = 450, ColumnDescription = "租户ID")]
        public string TenantId { get; set; }

        [SugarColumn(IsNullable = true, Length = 450, ColumnDescription = "流程名称")]
        public string Name { get; set; }

        [SugarColumn(IsNullable = true, Length = 255, ColumnDescription = "流程展示名称")]
        public string DisplayName { get; set; }

        [SugarColumn(IsNullable = true, Length = 255, ColumnDescription = "流程描述")]
        public string Description { get; set; }

        [SugarColumn(IsNullable = false, ColumnDescription = "流程版本")]
        public int Version { get; set; }

        [SugarColumn(IsNullable = false)]
        public bool IsSingleton { get; set; }

        [SugarColumn(IsNullable = false)]
        public int PersistenceBehavior { get; set; }

        [SugarColumn(IsNullable = false)]
        public bool DeleteCompletedInstances { get; set; }

        [SugarColumn(IsNullable = false, ColumnDescription = "是否发布")]
        public bool IsPublished { get; set; }

        [SugarColumn(IsNullable = false)]
        public bool IsLatest { get; set; }

        [SugarColumn(IsNullable = true, Length = 450)]
        public string Tag { get; set; }

        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(max),nvarchar(max)")]
        public string Data { get; set; }

        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTimeOffset CreatedAt { get; set; }
    }
}
